//定义路由
var router = require('express').Router();

//引入控制器里的商品操作方法
const { getAllShop, addShop, editShop, deleteShop} = require('../controller/shop')

//引入控制器里的用户操作方法
const { register, login, isLogin, unLogin} = require('../controller/user')

//商品请求路径 使用方法
router.get('/shop/list', getAllShop)
router.get('/shop/add', addShop)
router.get('/shop/edit', editShop)
router.get('/shop/delete', deleteShop)

//用户请求路径 使用方法
router.post('/user/register', register)
router.post('/user/login', login)
router.get('/user/isLogin', isLogin)
router.get('/user/unLogin', unLogin)

//暴露router
module.exports = router;

